<% if (addOnEnabled['start']) { ignoreFile() } %>import { defineConfig } from 'vite'
import { devtools } from '@tanstack/devtools-vite'
<%if (fileRouter) { %>import { TanStackRouterVite } from '@tanstack/router-plugin/vite'<% } %>
import solidPlugin from 'vite-plugin-solid'
import tailwindcss from '@tailwindcss/vite'<% if (addOnEnabled['solid-ui']) { %>
import { resolve } from 'node:path'<% } %><% if (addOnEnabled['module-federation']) { %>
import { federation } from "@module-federation/vite";<% } %><% if (addOnEnabled['module-federation']) { %>
import federationConfig from "./module-federation.config.js";
<% } %><% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %>
<%- integrationImportContent(integration) %>
<% } %>

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [devtools(), <% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %><%- integrationImportCode(integration) %>,<% } %>
    <% if (addOnEnabled['module-federation']) { %>federation(federationConfig), <% } %><%if (fileRouter) { %>
    TanStackRouterVite({ target: 'solid', autoCodeSplitting: true }),<% } %>
    solidPlugin(),
    tailwindcss(),
  ],<% if (addOnEnabled['solid-ui']) { %>
  resolve: {
    alias: {
      '~': resolve(__dirname, './src'),
    },
  },<% } %>
})
